#include <iostream>

#include <forward_list>
// 单向链表，只可以前进。相比较于std::list节省内存，提高性能
void testForwardList()
{
    std::forward_list<int> l = {1, 2, 3, 4, 5};
    for (auto &n : l)
        std::cout << n << "\n";
}

#include <unordered_set>

#include <array>

#include <tuple>
void testTuple()
{
    typedef std::tuple<int, std::string, double, char> vtuple;
    vtuple t(0, "Hello", 12.4, 0x09);
    std::cout << "0 " << std::get<0>(t) << "\n";
    std::cout << "1 " << std::get<1>(t).c_str() << "\n";
    std::cout << "2 " << std::get<2>(t) << "\n";
    std::cout << "3 " << std::get<3>(t) << "\n";
    std::get<0>(t) = 12;
    std::cout << "0 " << std::get<0>(t) << "\n";
}

int main(int argc, char const *argv[])
{
    testForwardList();
    testTuple();
    return 0;
}
